/**
 * 用户接口
 */

import { request } from "../utils/request"

export const userLogin = (code) => {
	return request({
		// url: "/auth/apple/login",
		url: "/auth/mini-program/login",
		data: {
			js_code: code
		},
		header: {
			"X-Client-Type": "MINI_PROGRAM",
			"X-OS-Type": "2",
			"X-Device-Token": "2",
		},
		method: "GET"
	})
}

	
export const getUserByid=(id)=>{
	return request({
		url:"/user/getInfoById?userId="+id,
		method:"GET"
	})
}


export const getUserMsg = () => {
	return request({
		url: "/api/user/info",
		method: "GET",
	})
}
export const updateUser = (params) => {
	return request({
		url: "/member/user/update",
		method: "PUT",
		data: params,
	})
}

export const updateUserInfo = (params) => {
	return request({
		url: "/api/user/updateUser",
		method: "PUT",
		data: params,
	})
}
